<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::KalmanFilter Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html">KalmanFilter</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pub-attribs">Public Attributes</a> |
<a href="../../d8/ddc/classcv_1_1KalmanFilter-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::KalmanFilter Class Reference<div class="ingroups"><a class="el" href="../../d7/de9/group__video.html">Video Analysis</a> » <a class="el" href="../../dc/d6b/group__video__track.html">Object Tracking</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>Kalman filter class.  
 <a href="../../dd/d6a/classcv_1_1KalmanFilter.html#details">More...</a></p>
<p><code>#include &lt;opencv2/video/tracking.hpp&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac0799f0611baee9e7e558f016e4a7b40"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#ac0799f0611baee9e7e558f016e4a7b40">KalmanFilter</a> ()</td></tr>
<tr class="separator:ac0799f0611baee9e7e558f016e4a7b40"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abac82ecfa530611a163255bc7d91c088"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#abac82ecfa530611a163255bc7d91c088">KalmanFilter</a> (int dynamParams, int measureParams, int controlParams=0, int type=<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a>)</td></tr>
<tr class="separator:abac82ecfa530611a163255bc7d91c088"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a60eb7feb569222ad0657ef1875884b5e"><td align="right" class="memItemLeft" valign="top">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a60eb7feb569222ad0657ef1875884b5e">correct</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;measurement)</td></tr>
<tr class="memdesc:a60eb7feb569222ad0657ef1875884b5e"><td class="mdescLeft"> </td><td class="mdescRight">Updates the predicted state from the measurement.  <a href="#a60eb7feb569222ad0657ef1875884b5e">More...</a><br/></td></tr>
<tr class="separator:a60eb7feb569222ad0657ef1875884b5e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4f136c39c016d3530c7c5801dd1ddb3b"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a4f136c39c016d3530c7c5801dd1ddb3b">init</a> (int dynamParams, int measureParams, int controlParams=0, int type=<a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a>)</td></tr>
<tr class="memdesc:a4f136c39c016d3530c7c5801dd1ddb3b"><td class="mdescLeft"> </td><td class="mdescRight">Re-initializes Kalman filter. The previous content is destroyed.  <a href="#a4f136c39c016d3530c7c5801dd1ddb3b">More...</a><br/></td></tr>
<tr class="separator:a4f136c39c016d3530c7c5801dd1ddb3b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa710d2255566bec8d6ce608d103d4fa7"><td align="right" class="memItemLeft" valign="top">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#aa710d2255566bec8d6ce608d103d4fa7">predict</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;control=<a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>())</td></tr>
<tr class="memdesc:aa710d2255566bec8d6ce608d103d4fa7"><td class="mdescLeft"> </td><td class="mdescRight">Computes a predicted state.  <a href="#aa710d2255566bec8d6ce608d103d4fa7">More...</a><br/></td></tr>
<tr class="separator:aa710d2255566bec8d6ce608d103d4fa7"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a6486e7287114810636fb33953280ed52"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a6486e7287114810636fb33953280ed52">controlMatrix</a></td></tr>
<tr class="memdesc:a6486e7287114810636fb33953280ed52"><td class="mdescLeft"> </td><td class="mdescRight">control matrix (B) (not used if there is no control)  <a href="#a6486e7287114810636fb33953280ed52">More...</a><br/></td></tr>
<tr class="separator:a6486e7287114810636fb33953280ed52"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a446d8e9a0105b0aa35cd66119c529803"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a446d8e9a0105b0aa35cd66119c529803">errorCovPost</a></td></tr>
<tr class="memdesc:a446d8e9a0105b0aa35cd66119c529803"><td class="mdescLeft"> </td><td class="mdescRight">posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k)  <a href="#a446d8e9a0105b0aa35cd66119c529803">More...</a><br/></td></tr>
<tr class="separator:a446d8e9a0105b0aa35cd66119c529803"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae1bd3a86f10753d723e7174d570d9ac1"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#ae1bd3a86f10753d723e7174d570d9ac1">errorCovPre</a></td></tr>
<tr class="memdesc:ae1bd3a86f10753d723e7174d570d9ac1"><td class="mdescLeft"> </td><td class="mdescRight">priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q)*/  <a href="#ae1bd3a86f10753d723e7174d570d9ac1">More...</a><br/></td></tr>
<tr class="separator:ae1bd3a86f10753d723e7174d570d9ac1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a077d73eb075b00779dc009a9057c27c3"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a077d73eb075b00779dc009a9057c27c3">gain</a></td></tr>
<tr class="memdesc:a077d73eb075b00779dc009a9057c27c3"><td class="mdescLeft"> </td><td class="mdescRight">Kalman gain matrix (K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R)  <a href="#a077d73eb075b00779dc009a9057c27c3">More...</a><br/></td></tr>
<tr class="separator:a077d73eb075b00779dc009a9057c27c3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0f60b78726d8eccf74a1f2479c2d1f97"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a0f60b78726d8eccf74a1f2479c2d1f97">measurementMatrix</a></td></tr>
<tr class="memdesc:a0f60b78726d8eccf74a1f2479c2d1f97"><td class="mdescLeft"> </td><td class="mdescRight">measurement matrix (H)  <a href="#a0f60b78726d8eccf74a1f2479c2d1f97">More...</a><br/></td></tr>
<tr class="separator:a0f60b78726d8eccf74a1f2479c2d1f97"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a828d051035ba807966ad65edf288a08e"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a828d051035ba807966ad65edf288a08e">measurementNoiseCov</a></td></tr>
<tr class="memdesc:a828d051035ba807966ad65edf288a08e"><td class="mdescLeft"> </td><td class="mdescRight">measurement noise covariance matrix (R)  <a href="#a828d051035ba807966ad65edf288a08e">More...</a><br/></td></tr>
<tr class="separator:a828d051035ba807966ad65edf288a08e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af19be9c0630d0f658bdbaea409a35cda"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#af19be9c0630d0f658bdbaea409a35cda">processNoiseCov</a></td></tr>
<tr class="memdesc:af19be9c0630d0f658bdbaea409a35cda"><td class="mdescLeft"> </td><td class="mdescRight">process noise covariance matrix (Q)  <a href="#af19be9c0630d0f658bdbaea409a35cda">More...</a><br/></td></tr>
<tr class="separator:af19be9c0630d0f658bdbaea409a35cda"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:add8fb5ac9c04b4600b679698dcb0447d"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#add8fb5ac9c04b4600b679698dcb0447d">statePost</a></td></tr>
<tr class="memdesc:add8fb5ac9c04b4600b679698dcb0447d"><td class="mdescLeft"> </td><td class="mdescRight">corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k))  <a href="#add8fb5ac9c04b4600b679698dcb0447d">More...</a><br/></td></tr>
<tr class="separator:add8fb5ac9c04b4600b679698dcb0447d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a926dece64b4e0e28c3f58af8b7793669"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a926dece64b4e0e28c3f58af8b7793669">statePre</a></td></tr>
<tr class="memdesc:a926dece64b4e0e28c3f58af8b7793669"><td class="mdescLeft"> </td><td class="mdescRight">predicted state (x'(k)): x(k)=A*x(k-1)+B*u(k)  <a href="#a926dece64b4e0e28c3f58af8b7793669">More...</a><br/></td></tr>
<tr class="separator:a926dece64b4e0e28c3f58af8b7793669"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa3d064a9194c2815dbe19c056b6dc763"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#aa3d064a9194c2815dbe19c056b6dc763">temp1</a></td></tr>
<tr class="separator:aa3d064a9194c2815dbe19c056b6dc763"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a14866bd506668eb0ed57b3974b3a1ee7"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a14866bd506668eb0ed57b3974b3a1ee7">temp2</a></td></tr>
<tr class="separator:a14866bd506668eb0ed57b3974b3a1ee7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afdbe36066a7d7f560aa02abe6be114d8"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#afdbe36066a7d7f560aa02abe6be114d8">temp3</a></td></tr>
<tr class="separator:afdbe36066a7d7f560aa02abe6be114d8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a84342f2d9dec1e6389025ad229401809"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a84342f2d9dec1e6389025ad229401809">temp4</a></td></tr>
<tr class="separator:a84342f2d9dec1e6389025ad229401809"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a846c2a6222c6e5d8b1385dfbccc83ae0"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a846c2a6222c6e5d8b1385dfbccc83ae0">temp5</a></td></tr>
<tr class="separator:a846c2a6222c6e5d8b1385dfbccc83ae0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0657173e411acbf40d2d3c6b46e03b19"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../dd/d6a/classcv_1_1KalmanFilter.html#a0657173e411acbf40d2d3c6b46e03b19">transitionMatrix</a></td></tr>
<tr class="memdesc:a0657173e411acbf40d2d3c6b46e03b19"><td class="mdescLeft"> </td><td class="mdescRight">state transition matrix (A)  <a href="#a0657173e411acbf40d2d3c6b46e03b19">More...</a><br/></td></tr>
<tr class="separator:a0657173e411acbf40d2d3c6b46e03b19"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Kalman filter class. </p>
<p>The class implements a standard Kalman filter <a href="http://en.wikipedia.org/wiki/Kalman_filter">http://en.wikipedia.org/wiki/Kalman_filter</a>, <a class="el" href="../../d0/de3/citelist.html#CITEREF_Welch95">[271]</a> . However, you can modify transitionMatrix, controlMatrix, and measurementMatrix to get an extended Kalman filter functionality. </p><dl class="section note"><dt>Note</dt><dd>In C API when CvKalman* kalmanFilter structure is not needed anymore, it should be released with cvReleaseKalman(&amp;kalmanFilter) </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#_a7">samples/cpp/kalman.cpp</a>.</dd>
</dl></div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac0799f0611baee9e7e558f016e4a7b40"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac0799f0611baee9e7e558f016e4a7b40">◆ </a></span>KalmanFilter() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::KalmanFilter::KalmanFilter </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;KalmanFilter object&gt;</td><td>=</td><td>cv.KalmanFilter(</td><td class="paramname"></td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;KalmanFilter object&gt;</td><td>=</td><td>cv.KalmanFilter(</td><td class="paramname">dynamParams, measureParams[, controlParams[, type]]</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="abac82ecfa530611a163255bc7d91c088"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abac82ecfa530611a163255bc7d91c088">◆ </a></span>KalmanFilter() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::KalmanFilter::KalmanFilter </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>dynamParams</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>measureParams</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>controlParams</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>type</em> = <code><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;KalmanFilter object&gt;</td><td>=</td><td>cv.KalmanFilter(</td><td class="paramname"></td><td>)</td></tr><tr><td style="width: 20px;"></td><td>&lt;KalmanFilter object&gt;</td><td>=</td><td>cv.KalmanFilter(</td><td class="paramname">dynamParams, measureParams[, controlParams[, type]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dynamParams</td><td>Dimensionality of the state. </td></tr>
    <tr><td class="paramname">measureParams</td><td>Dimensionality of the measurement. </td></tr>
    <tr><td class="paramname">controlParams</td><td>Dimensionality of the control vector. </td></tr>
    <tr><td class="paramname">type</td><td>Type of the created matrices that should be CV_32F or CV_64F. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a60eb7feb569222ad0657ef1875884b5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60eb7feb569222ad0657ef1875884b5e">◆ </a></span>correct()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&amp; cv::KalmanFilter::correct </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>measurement</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.KalmanFilter.correct(</td><td class="paramname">measurement</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Updates the predicted state from the measurement. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">measurement</td><td>The measured system parameters </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a28">samples/cpp/kalman.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a4f136c39c016d3530c7c5801dd1ddb3b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f136c39c016d3530c7c5801dd1ddb3b">◆ </a></span>init()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::KalmanFilter::init </td>
          <td>(</td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>dynamParams</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>measureParams</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>controlParams</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>type</em> = <code><a class="el" href="../../d1/d1b/group__core__hal__interface.html#ga4a3def5d72b74bed31f5f8ab7676099c">CV_32F</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Re-initializes Kalman filter. The previous content is destroyed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dynamParams</td><td>Dimensionality of the state. </td></tr>
    <tr><td class="paramname">measureParams</td><td>Dimensionality of the measurement. </td></tr>
    <tr><td class="paramname">controlParams</td><td>Dimensionality of the control vector. </td></tr>
    <tr><td class="paramname">type</td><td>Type of the created matrices that should be CV_32F or CV_64F. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="aa710d2255566bec8d6ce608d103d4fa7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa710d2255566bec8d6ce608d103d4fa7">◆ </a></span>predict()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&amp; cv::KalmanFilter::predict </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>control</em> = <code><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.KalmanFilter.predict(</td><td class="paramname">[, control]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Computes a predicted state. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">control</td><td>The optional input control </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a23">samples/cpp/kalman.cpp</a>.</dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a6486e7287114810636fb33953280ed52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6486e7287114810636fb33953280ed52">◆ </a></span>controlMatrix</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::controlMatrix</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>control matrix (B) (not used if there is no control) </p>
</div>
</div>
<a id="a446d8e9a0105b0aa35cd66119c529803"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a446d8e9a0105b0aa35cd66119c529803">◆ </a></span>errorCovPost</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::errorCovPost</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>posteriori error estimate covariance matrix (P(k)): P(k)=(I-K(k)*H)*P'(k) </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a18">samples/cpp/kalman.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="ae1bd3a86f10753d723e7174d570d9ac1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1bd3a86f10753d723e7174d570d9ac1">◆ </a></span>errorCovPre</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::errorCovPre</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>priori error estimate covariance matrix (P'(k)): P'(k)=A*P(k-1)*At + Q)*/ </p>
</div>
</div>
<a id="a077d73eb075b00779dc009a9057c27c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a077d73eb075b00779dc009a9057c27c3">◆ </a></span>gain</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::gain</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Kalman gain matrix (K(k)): K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R) </p>
</div>
</div>
<a id="a0f60b78726d8eccf74a1f2479c2d1f97"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f60b78726d8eccf74a1f2479c2d1f97">◆ </a></span>measurementMatrix</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::measurementMatrix</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>measurement matrix (H) </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a15">samples/cpp/kalman.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a828d051035ba807966ad65edf288a08e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a828d051035ba807966ad65edf288a08e">◆ </a></span>measurementNoiseCov</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::measurementNoiseCov</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>measurement noise covariance matrix (R) </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a17">samples/cpp/kalman.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="af19be9c0630d0f658bdbaea409a35cda"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af19be9c0630d0f658bdbaea409a35cda">◆ </a></span>processNoiseCov</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::processNoiseCov</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>process noise covariance matrix (Q) </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a16">samples/cpp/kalman.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="add8fb5ac9c04b4600b679698dcb0447d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add8fb5ac9c04b4600b679698dcb0447d">◆ </a></span>statePost</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::statePost</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>corrected state (x(k)): x(k)=x'(k)+K(k)*(z(k)-H*x'(k)) </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a19">samples/cpp/kalman.cpp</a>.</dd>
</dl>
</div>
</div>
<a id="a926dece64b4e0e28c3f58af8b7793669"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a926dece64b4e0e28c3f58af8b7793669">◆ </a></span>statePre</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::statePre</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>predicted state (x'(k)): x(k)=A*x(k-1)+B*u(k) </p>
</div>
</div>
<a id="aa3d064a9194c2815dbe19c056b6dc763"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3d064a9194c2815dbe19c056b6dc763">◆ </a></span>temp1</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::temp1</td>
        </tr>
      </table>
</div><div class="memdoc">
</div>
</div>
<a id="a14866bd506668eb0ed57b3974b3a1ee7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14866bd506668eb0ed57b3974b3a1ee7">◆ </a></span>temp2</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::temp2</td>
        </tr>
      </table>
</div><div class="memdoc">
</div>
</div>
<a id="afdbe36066a7d7f560aa02abe6be114d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdbe36066a7d7f560aa02abe6be114d8">◆ </a></span>temp3</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::temp3</td>
        </tr>
      </table>
</div><div class="memdoc">
</div>
</div>
<a id="a84342f2d9dec1e6389025ad229401809"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84342f2d9dec1e6389025ad229401809">◆ </a></span>temp4</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::temp4</td>
        </tr>
      </table>
</div><div class="memdoc">
</div>
</div>
<a id="a846c2a6222c6e5d8b1385dfbccc83ae0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a846c2a6222c6e5d8b1385dfbccc83ae0">◆ </a></span>temp5</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::temp5</td>
        </tr>
      </table>
</div><div class="memdoc">
</div>
</div>
<a id="a0657173e411acbf40d2d3c6b46e03b19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0657173e411acbf40d2d3c6b46e03b19">◆ </a></span>transitionMatrix</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::KalmanFilter::transitionMatrix</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>state transition matrix (A) </p>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="../../de/d70/samples_2cpp_2kalman_8cpp-example.html#a12">samples/cpp/kalman.cpp</a>.</dd>
</dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/video/<a class="el" href="../../d4/dc2/modules_2video_2include_2opencv2_2video_2tracking_8hpp.html">tracking.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:43 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
